//////////for First year First Tearm///////////////
function sum_of_marks_f_y_f_t(i)
    {
	   var f_y_1st_ht_mcq=document.getElementById("f_y_1st_ht_mcq"+i).value;
	   f_y_1st_ht_mcq=f_y_1st_ht_mcq==''?0:f_y_1st_ht_mcq;
	   var f_y_1st_ht_cq=document.getElementById("f_y_1st_ht_cq"+i).value;
	   f_y_1st_ht_cq=f_y_1st_ht_cq==''?0:f_y_1st_ht_cq;
	   var f_y_1st_ht_total=parseInt(f_y_1st_ht_mcq) + parseInt(f_y_1st_ht_cq);
	   document.getElementById("f_y_1st_ht_total"+i).value=f_y_1st_ht_total;
	   var f_y_1st_ct=document.getElementById("f_y_1st_ct"+i).value;
	   f_y_1st_ct=f_y_1st_ct==''?0:f_y_1st_ct;
	   var f_y_1st_gran_total =f_y_1st_ht_total + parseInt(f_y_1st_ct);
	   document.getElementById("f_y_1st_gran_total"+i).value=f_y_1st_gran_total;
	}
function ChangeHallTest_f_y_f_t(i)
{
   var f_y_1st_ht_total=document.getElementById("f_y_1st_ht_total"+i).value;
   f_y_1st_ht_total=f_y_1st_ht_total==''?0:f_y_1st_ht_total;
   var f_y_1st_ct=document.getElementById("f_y_1st_ct"+i).value;
   f_y_1st_ct=f_y_1st_ct==''?0:f_y_1st_ct;
   var f_y_1st_gran_total =parseInt(f_y_1st_ht_total) + parseInt(f_y_1st_ct);
   document.getElementById("f_y_1st_gran_total"+i).value=f_y_1st_gran_total;
}
///////////////////fro Promotion Test/////////////////////////////////
function sum_of_marks_f_y_pro_t(i)
   {
	   var f_y_pro_ht_cq_mcq=parseInt(document.getElementById("f_y_pro_ht_mcq"+i).value) + parseInt(document.getElementById("f_y_pro_ht_cq"+i).value);
	   var f_y_pro_ht_total =f_y_pro_ht_cq_mcq + parseInt(document.getElementById("f_y_pro_ht_prac"+i).value);
	   document.getElementById("f_y_pro_ht_total"+i).value=f_y_pro_ht_total;
	}

//////////for 2nd year First Tearm///////////////
function sum_of_marks_s_y_pre_t(i)
    {
	   var s_y_pre_ht_total=parseInt(document.getElementById("s_y_pre_ht_mcq"+i).value) + parseInt(document.getElementById("s_y_pre_ht_cq"+i).value);
	   document.getElementById("s_y_pre_ht_total"+i).value=s_y_pre_ht_total;
	   var s_y_pre_gran_total =s_y_pre_ht_total + parseInt(document.getElementById("s_y_pre_ct"+i).value);
	   document.getElementById("s_y_pre_gran_total"+i).value=s_y_pre_gran_total;
	}
////////////////////////////////////////////////
function sum_of_marks_s_y_test_e(i)
  {
	   var s_y_t_p1_total=parseInt(document.getElementById("s_y_t_p1_mcq"+i).value) + parseInt(document.getElementById("s_y_t_p1_cq"+i).value);
	   document.getElementById("s_y_t_p1_total"+i).value=s_y_t_p1_total;
	   var s_y_t_p2_total = parseInt(document.getElementById("s_y_t_p2_mcq"+i).value)+parseInt(document.getElementById("s_y_t_p2_cq"+i).value);
	   document.getElementById("s_y_t_p2_total"+i).value=s_y_t_p2_total;
	   document.getElementById("s_y_test_gra_total"+i).value=s_y_t_p1_total+s_y_t_p2_total;
	   
  }
